<?php
defined('IN_MAIN') or exit('Invalid Access!');

function format_error_page($content){
//format the error messages using the error message template
 global $vars;
 $tpl=file_get_contents(TEMPLATE_PATH . "/$vars[template]/error.htm");
 $tpl=replace_tag($tpl, array(
 "<%title%>"=>$vars["title"],
 "<%content%>"=>$content,
 "<%charset%>"=>$vars["charset"],
 "<%template_url%>"=>TEMPLATE_URL . "/$vars[template]"));
 return $tpl;
}
?>